package org.example.client;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class OpenFeignFallbackFactory implements FallbackFactory<TestFeignClient> {
    @Override
    public TestFeignClient create(Throwable cause) {
        return new TestFeignClient() {

            @Override
            public String test() {
                System.out.println("111111");
                return "ERROR";
            }
        };
    }
}
